Field of the Invention
The present invention relates to a method and apparatus for managing connections in a communication network.
Description of the Related Technology
The Transmission Control Protocol (TCP) is a Transport Layer (Layer 4) protocol that provides reliable connection-oriented communication over Internet Protocol (IP) networks. The TCP beaks up messages from applications that use higher layer protocols such as the Layer 7 protocols Hypertext Transfer Protocol (HTTP) and the File Transfer Protocol (FTP) into packets or segments and transmits those packets or segments from a sending entity to a receiving entity over an IP network. The receiving entity reassembles the packets. A ThCP packet comprises a header comprising fields containing header information and a data section following the header that contains payload data. Examples of header fields include the Sequence number field, the Acknowledgement number field and the Window Size Field.
The TCP uses a three-way handshake to set up a TCP/IP connection. As illustrated in FIG. 1, in order for (in this example) a Client A and a Server B to establish a TCP/IP connection, Client A first sends a TCP SYN packet to Server B, Server B replies by sending a TCP SYN-ACK packet to Client A and then Client A sends a TCP ACK packet to Server B.
A SYN packet is indicated by a SYN bit in the packet header being set to ‘1’, an ACK packet is indicated by an ACK bit in the packet header beings set to ‘1’ and a SYN-ACK packet is indicated by a SYN bit and an ACK bit in the packet header both being set to ‘1’.
A TCP header comprises a Sequence number field and an Acknowledgment number field. The Client A sets the value of the Sequence number field in the SYN packet's header to a random whole number A#. In response, the Server B sets the value of the Acknowledgment number field in the SYN-ACK's header to A#+1 and sets the value of the Sequence number field in the SYN-ACK's header to another random number B#. The Client A sets the value of the Sequence number field in the ACK packet to the received acknowledgment value A#+1 and the value of the acknowledgment field to one more than the received sequence number i.e. B#+1.
The Client A and the Server B use the options field in the headers of the SYN, SYN-ACK and ACK packets to agree what TCP options are to be enabled over the connection and to set any necessary settings that are to be used for the TCP options that are to enabled. These TCP options may include, for example, TCP Timestamps, (which can help TCP determine in which order packets were sent), Window Scaling (the scaling value setting of which is used to increase the maximum window size over a connection) and Selective Acknowledgments (which if enabled allows the receiver to acknowledge discontinuous blocks of packets which were received correctly).
The TCP connection is managed by the operating systems at each of the Client A and the Server B by means of a programming interface known as a TCP socket that represents an end point of the TCP connection. Once the three-way handshake is successfully completed, a TCP socket is in an established state at each of the Client A (client socket) and at the Server B (server socket). Each TCP socket uses its own port number that does not change during the lifetime of the connection and an IP address of the Client A or the Server B (as the case may be) which together uniquely identify that TCP socket in the context of the TCP connection. Each port number is used locally to route data to and from the Layer 7 application that is using that particular TCP connection. Together, the two sockets define the TCP connection via the 4—Tuple {Client A port; Client A IP address, Server B port, Server B IP address}.
When the communication between the Client A and Server B ends, a 4-way handshake is performed to tear down the TCP connection between the two.
US 2014/0036674 describes a system for split TCP flow control management in a cellular broadband network. A split TCP selection logic in the cellular network determines a context for a packet of a data flow and selects for the packet either an end-to-end TCP connection or a split TCP connection. Both connections are to a content server with the end-to-end TCP connection being a direct connection whereas the split TCP connection is split in two at a proxy server.
US2014/0036674 describes an example in which deep packet inspection is performed and packets can be routed to an end-to-end TCP connection regardless of context. Then, if the split TCP selection logic determines that the flow should be handled by the TCP split proxy server (i.e. instead of the already established end-to-end connection), a hand-off to a TCP split connection is made where the flow is redirected to the TCP split proxy, and the TCP split proxy is inserted in the TCP connection.
In US2014/0036674, the semantics and other properties of the existing end-to-end connection (e.g. sequence numbers, acknowledgment numbers) are not preserved when the TCP split proxy is inserted in the existing end-to-end TCP connection.